<!DOCTYPE html>
<%@ include file="/WEB-INF/jsp/include/include.jsp"%>
<html>
<head>
<title>
	<fmt:message key="alvin.title" />
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link href="${ctx}styles/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="${ctx}styles/style.css" rel="stylesheet" media="screen">
<!-- Le styles -->
<style type="text/css">
  /* Override some defaults */
  html, body {
    background-color: #eee;
  }
  body {
    padding-top: 40px; 
  }
  .container {
    width: 300px;
  }

  /* The white background content wrapper */
  .container > .content {
    background-color: #fff;
    padding: 20px;
    margin: 0 -20px; 
    -webkit-border-radius: 10px 10px 10px 10px;
       -moz-border-radius: 10px 10px 10px 10px;
            border-radius: 10px 10px 10px 10px;
    -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.15);
       -moz-box-shadow: 0 1px 2px rgba(0,0,0,.15);
            box-shadow: 0 1px 2px rgba(0,0,0,.15);
  }

.login-form {
margin-left: 65px;
}

legend {
margin-right: -50px;
font-weight: bold;
color: #404040;
}

</style>

</head>
<body>
  <div class="container">
    <div class="content">
      <div class="row">
        <div class="login-form">
          <h2><fmt:message key="login.title" /></h2>
			<c:if test="${not empty param.error}">
				<div class="error">
					<c:if test="${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].getClass().simpleName == 'AuthenticationServiceException'}"><span> <fmt:message key="AbstractUserDetailsAuthenticationProvider.badCredentials" /> </span></c:if>
					<c:if test="${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].getClass().simpleName != 'AuthenticationServiceException'}"><span> ${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message} </span></c:if>
				</div>
			</c:if>          
		  <form action="${ctx}j_spring_security_check" method="POST">
            <fieldset>
              <div class="clearfix">
                <input type="text"  name="j_username" placeholder="<fmt:message key='login.mobile' />" value="${mobile}" />
              </div>
              <div class="clearfix">
                <input name="j_password" type="password" placeholder="<fmt:message key='login.password' />">
              </div>
              <button class="btn btn-primary" type="submit"><fmt:message key='common.login' /></button>
              <a href="${ctx}reg.htm"><fmt:message key="login.register" /></a>
            </fieldset>
          </form>
        </div>
      </div>
    </div>
  </div> <!-- /container -->
</body>
</html>